package com.xiaolei.lib.annotation.translators;

import java.lang.reflect.Field;
import java.lang.reflect.Method;

import com.xiaolei.lib.Activity.IActivity;
import com.xiaolei.lib.Activity.bean.AnnotationWrape;
import com.xiaolei.lib.core.ITranslator;

import android.content.Intent;

public class getIntentTranslator implements ITranslator
{
	@Override
	public void execute(Field field, IActivity activity, AnnotationWrape annotation)
	{
		try
		{
			if (!field.isAccessible())
				field.setAccessible(true);
			Intent intent = activity.getIntent();
			field.set(activity, intent);
		} catch (Exception e)
		{
			e.printStackTrace();
		}
	}

	@Override
	public void execute(Method method, IActivity activity, AnnotationWrape annotation)
	{
		// TODO Auto-generated method stub

	}

	@Override
	public void execute(Class<?> type, IActivity activity, AnnotationWrape annotation)
	{
		// TODO Auto-generated method stub

	}

}
